/* 简洁的模型体验模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: white;
    border-radius: 8px;
    max-width: 700px;
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-container {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.close-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 24px;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-content {
    padding: 24px;
}

.model-info {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.model-info h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 600;
}

.model-info p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
    font-size: 0.95rem;
}

.input-section h4 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 600;
}

.preset-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 8px 16px;
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.sensor-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.sensor-group {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
}

.sensor-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #374151;
}

.sensor-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
}

.sensor-inputs input {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.sensor-inputs input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.action-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.predict-btn {
    padding: 10px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.predict-btn:hover:not(:disabled) {
    background: #2563eb;
}

.predict-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-section {
    margin-top: 20px;
    padding: 16px;
    background: #f0f9ff;
    border-radius: 6px;
    border-left: 3px solid #0ea5e9;
}

.result-section h4 {
    margin: 0 0 12px 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.result-display {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #1e293b;
}

.prediction-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #059669;
    margin: 8px 0;
}

.ensemble-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.model-result {
    padding: 12px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.model-result h5 {
    margin: 0 0 6px 0;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 500;
}

.model-result .value {
    font-size: 1rem;
    font-weight: 600;
    color: #059669;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
        margin: 20px;
    }
    
    .modal-content {
        padding: 16px;
    }
    
    .sensor-groups {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .preset-buttons {
        flex-direction: column;
    }
} 